#include "PlayerState.h"
#include "Box.h"
#include "Player.h"
#include "RSManager.h"

PlayerState::PlayerState(void)
{
	collsionBox = new Box();	
}


PlayerState::~PlayerState(void)
{
}

void PlayerState::setDirection(JUMP_DIRECTION jumpDirection, GO_DIRECTION goDirection)
{
	jDirection = jumpDirection;
	gDirection = goDirection;
}
//
JUMP_DIRECTION PlayerState::getJumpDirection()
{
	return jDirection;
}

GO_DIRECTION PlayerState::getGoDirection()
{
	return gDirection;
}

bool PlayerState::setDelay(float time)
{
	if(timeDelay > 180)
	{		
		return false;
	}
	else
	{
		timeDelay+=time;
		return true;
	}
}

void PlayerState::playSoundEffect(BULLET_ID id)
{
	switch (id)
	{
	case B_S:
		RSManager::getInstance()->playMusic(SHOOT_S);
		break;
	case B_L:
		RSManager::getInstance()->playMusic(SHOOT_L);
		break;
	case B_R:
		RSManager::getInstance()->playMusic(SHOOT_R);	
		break;
	case B_M:
		RSManager::getInstance()->playMusic(SHOOT_R);
		break;
	case B_F:
		break;
	default:
		break;
	}
}
